﻿<Window x:Class="OpenExpressApp.WPF.Controls.ViewDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
    SizeToContent="WidthAndHeight" ResizeMode="NoResize" ShowInTaskbar="False" MinWidth="400" MinHeight="400">
    <DockPanel>
        <StackPanel Name="commandPanel" Height="30" HorizontalAlignment="Right" DockPanel.Dock="Bottom" Orientation="Horizontal" Visibility="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=ButtonPanelVisibility}">
            <Button AutomationProperties.AutomationId="OK" Width="75" IsDefault="True" x:Uid="ViewDialog_AcceptButton" Click="OnAcceptButtonClick" Margin="4" >确定</Button>
            <Button AutomationProperties.AutomationId="Cancel" Width="75" IsCancel="True" x:Uid="ViewDialog_CancelButton" Click="OnCancelButtonClick" Margin="10,4,20,4">取消</Button>
        </StackPanel>
        <ContentPresenter Content="{Binding Path=View,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
    </DockPanel>
</Window>
